<?php
/**
 * Created by PhpStorm.
 * User: tjjs
 * Date: 17-8-10
 * Time: 下午5:45
 */

namespace ActionsHttp;


use Data\Order_form_DAO;
use Utils\EntryOrderForm;

class RestaurantEntryListYes extends BaseActionHttp
{
    public function doAction() {
        parent::doAction();
        // 商户id
        $restaurant_id = $_SESSION[RESTAURANT_ID];
        $restaurant_id = 1;

        // 每页显示条数
        $every_page_counts = (int)$this->data[EVERY_PAGE_COUNTS];
        // 页码
        $page_index = (int)$this->data[PAGE_INDEX];
        // 起始值
        $list_start = ($page_index-1)*$every_page_counts;

        $entry_list = Order_form_DAO::getEntryList($restaurant_id,$list_start,$every_page_counts);

        // 返回数据
        $this->setValue(ENTRY_LIST_YES,$entry_list);
        $this->ResponseDataToCurrentClient();

    }
}